main div {
  border: solid 1px #ddd;
  padding: 1rem;
  display: none;
}
main input[type='radio']#stu:checked ~ div[name='stu'] {
  display: block;
}
main input[type='radio']#teacher:checked ~ div[name='teacher'] {
  display: block;
}
